export function handleBlobFile(response: any, fileName: string = 'file') {
    // 处理返回的文件流
    const blob = response;
    if (blob && blob.size === 0) {
        ElMessage.error('内容为空，无法下载');
        return;
    }
    const link = document.createElement('a');
    // 兼容一下 入参不是 File Blob 类型情况
    const binaryData = [] as any;
    binaryData.push(response);
    link.href = window.URL.createObjectURL(new Blob(binaryData));
    link.download = fileName;
    document.body.appendChild(link);
    link.click();
    window.setTimeout(function () {
        // @ts-ignore
        window.URL.revokeObjectURL(blob);
        document.body.removeChild(link);
    }, 0);
}